bcm-specs

[Specification

  1. Backup PHYRegisters 0x429, 0x1, 0x811, 0x812, 0x814, 0x815, 0x5A, 0x59, 0x58, 0xA, 0x3, 0x80F, 0x810, 0x2B, 0x15

  2. Perform a dummy read on PHYRegister 0x2D

  3. Backup the current B/G baseband attenuation value
  4. Backup RadioRegisters 0x52, 0x43 and 0x7A

  5. Bitwise AND PHYRegister 0x429 with 0x3FFF

  6. Bitwise AND PHYRegister 0x1 with 0x8000

  7. Bitwise OR PHYRegister 0x811 with 0x2

  8. Bitwise AND PHYRegister 0x812 with 0xFFFD

  9. Bitwise OR PHYRegister 0x811 with 0x1

  10. Bitwise AND PHYRegister 0x812 with 0xFFFE

  11. Bitwise OR PHYRegister 0x814 with 0x1

  12. Bitwise AND PHYRegister 0x815 with 0xFFFE

  13. Bitwise OR PHYRegister 0x814 with 0x2

  14. Bitwise AND PHYRegister 0x815 with 0xFFFD

  15. Bitwise OR PHYRegister 0x811 with 0xC

  16. Bitwise OR PHYRegister 0x812 with 0xC

  17. MaskSet PHYRegister 0x811 with mask 0xFFCF and set with 0x30

  18. MaskSet PHYRegister 0x812 with mask 0xFFCF and set with 0x10

  19. Write 0x780 to PHYRegister 0x5A

  20. Write 0xC810 to PHYRegister 0x59

  21. Write 0xD to PHYRegister 0x58

  22. If the Analog Core Version is 0

    1. Write 0x122 to PHYRegister 0x3

  23. Otherwise
    1. Bitwise OR PHYRegister 0xA with 0x2000

  24. Bitwise OR PHYRegister 0x814 with 0x4

  25. Bitwise AND PHYRegister 0x815 with 0xFFFB

  26. MaskSet PHYRegister 0x3 with mask 0xFF9F and set with 0x40

  27. If the Radio Version is 0x2050 and the Radio Revision is 2
    1. Write 0 to RadioRegister 0x52

    2. MaskSet RadioRegister 0x43 with mask 0xFFF0 and set 0x9

    3. The number of times to go through first loop will be 9
  28. Otherwise, if the Radio Revision is 8
    1. Write 0xF to RadioRegister 0x43

    2. The number of times to go through the first loop will be 0xF
  29. Otherwise
    1. The number of times to go through the first loop will be 0
  30. Set the Baseband Attenuation to 0xB
  31. If the PHY Revision is 3 or greater
    1. Write 0xC020 to PHYRegister 0x80F

  32. Otherwise
    1. Write 0x8020 to PHYRegister 0x80F

  33. Write 0 to PHYRegister 0x810

  34. MaskSet PHYRegister 0x2B with mask 0xFFC0 and set with 0x1

  35. MaskSet PHYRegister 0x2B with mask 0xC0FF and set with 0x800

  36. Bitwise OR PHYRegister 0x811 with 0x100

  37. Bitwise AND PHYRegister 0x812 with 0xCFFF

  38. If the BoardFlags has BFL_EXTLNA set and the PHY Revision is 7 or newer

    1. Bitwise OR PHYRegister 0x811 with 0x800

    2. Bitwise OR PHYRegister 0x812 with 0x8000

  39. Bitwise AND RadioRegister 0x7A with 0xF7

  40. Loop, starting at 0 to the value found above
    1. Write the value found above for the number of times through the loop to RadioRegister 0x43 (constant through the loop)

    2. MaskSet PHYRegister 0x812 with mask 0xF0FF and set with the loop position left shifted by 8

    3. MaskSet PHYRegister 0x15 with mask 0xFFF and set with 0xA000

    4. MaskSet PHYRegister 0x15 with mask 0xFFF and set with 0xF000

    5. Delay for 20 uSec
    6. If the value of PHYRegister 0x2D is 0xDFC or greater (unsigned)

      1. Break from the loop
  41. Save the number of times we went through the loop
  42. Save the remaining number of times we could have looped
  43. If the number of times we went through the first loop was 8 or higher
    1. Bitwise OR PHYRegister 0x812 with 0x30

    2. Loop from the number of times we went through the first loop loop - 8 to 0xF
      1. MaskSet PHYRegister 0x812 with mask 0xF0FF and set with the loop position left shifted by 8

      2. MaskSet PHYRegister 0x15 with mask 0x0FFF and set with 0xA000

      3. MaskSet PHYRegister 0x15 with mask 0x0FFF and set with 0xF000

      4. Delay for 20 uSec
      5. If the value of PHYRegister 0x2D is 0xDFC or greater (unsigned)

        1. Break
  44. Save 24 - 3 * the number of times through this loop (this is the result of the second loop)
  45. Restore PHYRegisters 0x814, 0x815, 0x5A, 0x59, 0x58, 0xA, 0x3, 0x80F, 0x810, 0x2B and 0x15

  46. Restore the original Baseband Attenuation value
  47. Restore RadioRegisters 0x52, 0x43 and 0x7A

  48. Write the backed up value of PHYRegister 0x811 OR'd with 0x3 to PHYRegister 0x811

  49. Delay for 10 uSec
  50. Restore PHYRegisters 0x811, 0x812, 0x429 and 0x1

  51. The first saved Loopback Gain value is number of times we went through the first loop * 6 - the number of times remaining in the first loop * 4, then subtract 0xB from the result (this is the Maximum Loopback Gain in hdB)
  52. The second saved Loopback Gain value is the result of the second loop * 2 (this is the TRSW RX Gain in hdB)

Exported/Archived from the wiki to HTML on 2016-10-27